package com.jn.mvvm2.entity;

import java.util.List;

public class News {


   private String reason;
   private ResultDTO result;
   private int error_code;

   public String getReason() {
      return reason;
   }

   public void setReason(String reason) {
      this.reason = reason;
   }

   public ResultDTO getResult() {
      return result;
   }

   public void setResult(ResultDTO result) {
      this.result = result;
   }

   public int getError_code() {
      return error_code;
   }

   public void setError_code(int error_code) {
      this.error_code = error_code;
   }

   public static class ResultDTO {
      private int curpage;
      private int allnum;
      private List<NewslistDTO> newslist;

      public int getCurpage() {
         return curpage;
      }

      public void setCurpage(int curpage) {
         this.curpage = curpage;
      }

      public int getAllnum() {
         return allnum;
      }

      public void setAllnum(int allnum) {
         this.allnum = allnum;
      }

      public List<NewslistDTO> getNewslist() {
         return newslist;
      }

      public void setNewslist(List<NewslistDTO> newslist) {
         this.newslist = newslist;
      }

      public static class NewslistDTO {
         private String id;
         private String ctime;
         private String title;
         private String description;
         private String source;
         private String picUrl;
         private String url;

         public String getId() {
            return id;
         }

         public void setId(String id) {
            this.id = id;
         }

         public String getCtime() {
            return ctime;
         }

         public void setCtime(String ctime) {
            this.ctime = ctime;
         }

         public String getTitle() {
            return title;
         }

         public void setTitle(String title) {
            this.title = title;
         }

         public String getDescription() {
            return description;
         }

         public void setDescription(String description) {
            this.description = description;
         }

         public String getSource() {
            return source;
         }

         public void setSource(String source) {
            this.source = source;
         }

         public String getPicUrl() {
            return picUrl;
         }

         public void setPicUrl(String picUrl) {
            this.picUrl = picUrl;
         }

         public String getUrl() {
            return url;
         }

         public void setUrl(String url) {
            this.url = url;
         }

         @Override
         public String toString() {
            return "NewslistDTO{" +
                    "id='" + id + '\'' +
                    ", ctime='" + ctime + '\'' +
                    ", title='" + title + '\'' +
                    ", description='" + description + '\'' +
                    ", source='" + source + '\'' +
                    ", picUrl='" + picUrl + '\'' +
                    ", url='" + url + '\'' +
                    '}';
         }
      }

      @Override
      public String toString() {
         return "ResultDTO{" +
                 "curpage=" + curpage +
                 ", allnum=" + allnum +
                 ", newslist=" + newslist +
                 '}';
      }
   }

   @Override
   public String toString() {
      return "News{" +
              "reason='" + reason + '\'' +
              ", result=" + result +
              ", error_code=" + error_code +
              '}';
   }
}
